EXEC = bin/client bin/service
COMPILE = gcc
CFLAGS = -c -I.
#../xmlrpc-c-config.test
#xmlrpc-c-config
XMLRPC_C_CONFIG = ../../xmlrpc_main/xmlrpc-c-config.test
INCLUDES = -I. $(shell $(XMLRPC_C_CONFIG) client abyss-server --cflags)
SERVER_LIB = $(shell $(XMLRPC_C_CONFIG) abyss-server --libs)
CLIENT_LIB = $(shell $(XMLRPC_C_CONFIG) client --libs)

all: client service

client: client.o
	$(COMPILE) -o bin/client client.o $(CLIENT_LIB)
	
service: service.o
	$(COMPILE) -o bin/service service.o $(SERVER_LIB) 
	
client.o: client.c
	$(COMPILE) $(CFLAGS) $(INCLUDES) client.c
	
service.o: service.c
	$(COMPILE) $(CFLAGS) $(INCLUDES) service.c
	
clean:
	\rm *.o $(EXEC)
	
tar:
	tar cfv project3.tar client.c service.c